package cn.jhz.learn.blog.dao.article;

import cn.jhz.learn.blog.po.article.BlogArticleSubfieldAssociative;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface BlogArticleSubfieldAssociativeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(BlogArticleSubfieldAssociative record);

    int insertSelective(BlogArticleSubfieldAssociative record);

    BlogArticleSubfieldAssociative selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(BlogArticleSubfieldAssociative record);

    int updateByPrimaryKey(BlogArticleSubfieldAssociative record);

    /*自定义*/
    int batchInsert(@Param("list")List<BlogArticleSubfieldAssociative> associative);

    int batchUpdateStatusByPrimaryKey(@Param("status")Byte status, @Param("list")List<Integer> ids);

    int batchUpdateStatusByArticleId(@Param("status")Byte status, @Param("article_id")Integer articleId);

    int batchUpdateStatusBySubfieldId(@Param("status")Byte status, @Param("subfield_id")Integer subfieldId);

    List<BlogArticleSubfieldAssociative> batchSelectByArticleId(@Param("article_id") Integer articleId);
}